<template>
	<view class="zone">
		<view class="status_bar"></view>
		<Header title="" color="#fff" ></Header>

		<view class="main">
			<image src="http://img.cpgm.cc/panda/static/invite/invite.png" mode="widthFix" />
			<view class="posabox">
				<view class="qrimg">
					<tki-qrcode ref="qrcode" cid="qrcode" :lv="1" :val="val" :size="140" :loadMake="true" />
				</view>
				<view class="word">
					<text>邀请好友一起组队挖水晶</text>
					<view>
						<text>我的邀请码：{{invite_code}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="fixd">
				<view class="item" @click="show = true">
					<image src="http://img.cpgm.cc/panda/static/self/wx.png" mode="widthFix" />
					<text>分享给微信好友</text>
				</view>
				<view class="line"></view>
				<view class="item" @click="show = true">
					<image src="http://img.cpgm.cc/panda/static/self/qq.png" mode="widthFix" />
					<text>分享给QQ好友</text>
				</view>
			</view>

			<u-mask :show="show">
				<view class="warp">
					<view class="maskbox">
						<image class="close" @click="show = false" src="http://img.cpgm.cc/panda/static/public/close.png" mode="widthFix" />
						<h3>推广链接</h3>
						<view class="content">
							<p>{{ val }}</p>
							<view class="button" @click="$p.copy(val)">复制链接</view>
						</view>
					</view>
				</view>
			</u-mask>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				val: "http://chwmx.qxgm.site:85/qr/" + uni.getStorageSync('invite_code'),
				invite_code: uni.getStorageSync('invite_code'),
				indicatorDots: false,
				autoplay: false,
				interval: 2000,
				userinfo: uni.getStorageSync('userinfo'),
				show:false,
				val: "http://chwmx.qxgm.site:85/qr/" + uni.getStorageSync("invite_code"),
			};
		},
		onLoad() {
			this.getUserInfo();
		},
		methods: {
			// 获取个人信息
			getUserInfo(){
				this.$getUserInfo.getUserInfo((res)=>{
					if(res.code == 1) {
						this.userinfo = res.data
					}
				})
			},	
		},
	}
</script>

<style lang="less">

.zone {
	background: #000;
	min-height: 100vh;
}
	.main {
		position: relative;
		padding: 0 0 200px;
		line-height: 0;
		margin-top: -60px;

		image {
			width: 100%;
		}
	}

	.top {
		width: 100%;
		display: flex;
		align-items: center;
		flex-direction: column;
	}

	.title {
		width: 50%;
	}

	.bottom {
		position: relative;
		display: flex;
		width: 100%;
		flex-direction: column;
		align-items: center;

		text {
			color: #fff;
			font-size: 12px;
			line-height: 14px;
			margin-top: 8px;
		}
	}

	.posabox {
		position: absolute;
		bottom: 24%;
		left: 20px;
		display: flex;
		align-items: center;

		text {
			line-height: 20px;
		}
	}

	.word {
		display: flex;
		flex-direction: column;
		margin-left: 15px;

		text:nth-child(1) {
			font-size: 16px;
			font-weight: 600;
			color: #fff;
			background: linear-gradient(90deg, #7BFFB1 0%, #00AE95 100%);
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
		}

		view {
			background: rgba(255, 255, 255, 0.2);
			border-radius: 4px;
			padding: 4px 10px;
			margin-top: 14%;

			text {
				color: #00AE95;
				font-size: 12px !important;
				font-weight: 600 !important;
			}
		}
	}

	.bg {
		width: 95%;
		display: flex;
		align-items: center;
		flex-direction: column;
	}

	.qrimg {
		display: inline-block;
		// margin-top: 20px;
		padding: 8px 8px;
		background: #fff;
		border-radius: 5px;
		line-height: 0;

		text {
			width: 100%;
			display: block;
			line-height: 18px;
			text-align: center;
		}
	}
	.swiper {
		min-height: 91vh;
		background: #000;
		border-radius: 10px;
	}
	.swiper-item {
		background: #000;
		padding: 0 10px 10px;
		position: relative;
		

		image {
			width: 100%;
			border-radius: 10px;
		}
	}

	.posa1 {
		width: 90%;
		left: 5%;
		position: absolute;
		bottom: 5%;
		background: url('http://img.cpgm.cc/panda/static/invite/botbg.png');
		background-size: 100% 100%;
		padding: 10px;
		display: flex;
		align-items: center;
	}

	.right {
		flex: 1;
		margin-left: 10px;

		p {
			color: #000000;
			font-size: 12px;
			font-weight: 600;
		}
		p:nth-child(2) {
			margin: 10px 0;
		}
	}
	.info {
		padding: 5px;
		background: rgba(255, 255, 255, 0.6);
		border-radius: 15px;
		display: flex;
		align-items: center;

		image {
			width: 25px;
			border-radius: 50%;
			margin-right: 10px;
		}
		text {
			color: #000000;
			font-size: 13px;
		}
	}


	.posa2 {
		width: 45%;
		position: absolute;
		bottom: 6%;
		left: 5%;
		display: flex;
		flex-direction: column;

		.img2 {
			width: 36px;
			border-radius: 50%;
		}

		.myis {
			color: #F27441;
			font-size: 14px;
			margin-top: 10px;
			font-weight: 600;
		}
		.mygame {
			color: #000000;
			font-size: 12px;
			font-weight: 600;
			margin: 10px 0;
		}
		.invitecode{
			color: #000;
			font-weight: 600;
			font-size: 12px;
		}
	}

	.codebox {
		width: fit-content;
		background: #fff;
		border-radius: 5px;
		display: flex;
		align-items: center;
		padding: 5px;
		margin-top: 5px;

		text {
			writing-mode: tb-rl;
		}
	}
	.qrimg2 {
		width: fit-content;
		display: inline-block;
		// margin-top: 20px;
		padding: 8px;
		background: #fff;
		border-radius: 5px;
		line-height: 0;
	}


.fixd {
	position: fixed;
	bottom: 0;
	width: 100%;
	max-width: 480px;
	width: 100%;
	max-width: 480px;
	background: #002424 linear-gradient(180deg, #C8C8C8 0%, #FFFFFF 100%);
	box-shadow: inset 0px 2 0px 0px rgba(255,255,255,0.5);
	border-radius: 6px 6px 0px 0px;
	padding: 15px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 20px;
}

.line {
	width: 1px;
	height: 45px;
	background: #000000;
	opacity: 0.2;
}

.item {
	width: 48%;
	display: flex;
	flex-direction: column;
	align-items: center;

	image {
		width: 40px;
	}
	text {
		font-size: 11px;
		font-weight: 400;
		color: #000000;
		line-height: 16px;
		margin-top: 10px;
	}
}

	


.maskbox {
	background: linear-gradient(180deg, #61FBED 0%, #E4FDFC 31%, #F6FEEB 68%, #F5FEA8 100%);
	box-shadow: inset 5px 5px 47px 0px rgba(255,255,255,0.5), inset -5px -5px 47px 0px rgba(255,255,255,0.5), inset 0px 2px 0px 0px rgba(255,255,255,0.5);
	padding: 15px;
	border-radius: 10px;

	h3 {
		width: 50%;
		font-size: 24px;
		position: relative;
		z-index: 10;
		text-align: center;
		margin: 0 auto;
	}

	h3::after {
		content: '';
		width: 90%;
		height: 30px;
		background: url('http://img.cpgm.cc/panda/static/mask/banner.png');
		background-size: 100% auto;
		background-position: center;
		background-repeat: no-repeat;
		position: absolute;
		top: 0;
		left: 0;
		z-index: -1;
	}

	.content {
		padding: 20px;
		margin-top: 15px;
		background: rgba(255, 255, 255, 0.8);
		border-radius: 8px;
		box-sizing: border-box;

		p {
			color: #075F61;
			font-size: 16px;
			font-weight: 600;
			word-break: break-all;
			text-align: center;
		}

		.button {
			width: 80%;
			height: 55px;
			background: url('http://img.cpgm.cc/panda/static/public/btn2.png');
			background-size: 100% 100%;
			color: #B73800;
			font-size: 18px;
			font-weight: 600;
			margin: 0 auto;
			margin-top: 20px;
		}
	}

	.close {
		width: 25px;
		position: absolute;
		top: 10px;
		right: 10px;
	}



}




</style>